<?php
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $content string */

$this->beginContent('@frontend/views/layouts/mkt_common.php')
?>

<style>
#postTab .weui_navbar_item.weui_bar_item_on {
  background-color: #ffffff;
  color:#F53F33;
  border-bottom: 2px solid red;
}
#postTab .weui_navbar_item.weui_bar_item_on::after {
  border-bottom: 1px solid #F53F33;
}
#postTab .weui_navbar_item::after {
  border-right: 0px;
}
#postTab .weui_navbar_item {
  background-color: #ffffff;
  border-right: 0px;
  font-size: 16px;
  padding: 8px 0;
}
#postTab .weui_panel:after {
    border-bottom: 0px;
}
#postTab .page{
  padding: 0px;
  min-height: calc(100vh - 95px);
  min-height: -moz-calc(100vh - 95px);
  min-height: -webkit-calc(100vh - 95px);
  background: #ffffff none repeat scroll 0 0;
}
#postTab .weui_media_box .weui_media_box:before {
  border-top: 0px;
}
</style>

<div id="postTab" class="weui_tab">
	<div class="weui_navbar" style="width: 100vw;">
		<div onclick="gotoMyPost();" class="weui_navbar_item <?php echo yii::$app->controller->action->id == 'self-post-mypost' ? 'weui_bar_item_on' : ''; ?>">我的帖子</div>
		<div onclick="gotoPostMsg();" class="weui_navbar_item <?php echo yii::$app->controller->action->id == 'self-post-message' ? 'weui_bar_item_on' : ''; ?>">
        <?php if ($this->context->getMe()->getReceivedPostResponseCount()): ?>
        <div class="count" style="height:10px;width:10px;margin-top: 12px;"></div>
        <?php endif; ?>

        帖子消息</div>
		<div onclick="gotoPostCollec();" class="weui_navbar_item <?php echo yii::$app->controller->action->id == 'self-post-collect' ? 'weui_bar_item_on' : ''; ?>">收藏帖子</div>
	</div>
	<div class="weui_tab_bd" style="padding-top: 40px;">
		<div class="weui_tab_bd_item" style="display: block;">
            <?php echo $content ?>
		</div>
	</div>
</div>

<script type="text/javascript">
function gotoMyPost()
{
	window.location.href="<?php echo Url::to(['wap/self-post-mypost']); ?>";
	document.title = '我的帖子';
}
function gotoPostMsg()
{
	window.location.href="<?php echo Url::to(['wap/self-post-message']); ?>";
	document.title = '帖子消息';
}
function gotoPostCollec()
{
	window.location.href="<?php echo Url::to(['wap/self-post-collect']); ?>";
	document.title = '收藏帖子';
}
</script>

<?php $this->endContent() ?>
